package com.example.demo.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

/**
 * 培训系统-提交记录
 * @TableName train_commit_record
 */
@TableName(value ="train_commit_record")
public class TrainCommitRecord implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 班级id
     */
    private Long classId;

    /**
     * 用户名
     */
    private String username;

    /**
     * 题目id
     */
    private Long problemId;

    /**
     * 提交时间
     */
    private Date submitTime;

    /**
     * 代码语言
     */
    private String language;

    /**
     * 答案（源代码）
     */
    private String answer;

    /**
     * 分数
     */
    private Integer score;

    /**
     * 提交id，记录在voj_submission的id，默认为0，表示没有创建提交
     */
    private Long submitId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 作业id
     */
    private Long homeworkId;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 评测状态，2为评测结束，1为评测中
     */
    private Integer evalStatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 班级id
     */
    public Long getClassId() {
        return classId;
    }

    /**
     * 班级id
     */
    public void setClassId(Long classId) {
        this.classId = classId;
    }

    /**
     * 用户名
     */
    public String getUsername() {
        return username;
    }

    /**
     * 用户名
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 题目id
     */
    public Long getProblemId() {
        return problemId;
    }

    /**
     * 题目id
     */
    public void setProblemId(Long problemId) {
        this.problemId = problemId;
    }

    /**
     * 提交时间
     */
    public Date getSubmitTime() {
        return submitTime;
    }

    /**
     * 提交时间
     */
    public void setSubmitTime(Date submitTime) {
        this.submitTime = submitTime;
    }

    /**
     * 代码语言
     */
    public String getLanguage() {
        return language;
    }

    /**
     * 代码语言
     */
    public void setLanguage(String language) {
        this.language = language;
    }

    /**
     * 答案（源代码）
     */
    public String getAnswer() {
        return answer;
    }

    /**
     * 答案（源代码）
     */
    public void setAnswer(String answer) {
        this.answer = answer;
    }

    /**
     * 分数
     */
    public Integer getScore() {
        return score;
    }

    /**
     * 分数
     */
    public void setScore(Integer score) {
        this.score = score;
    }

    /**
     * 提交id，记录在voj_submission的id，默认为0，表示没有创建提交
     */
    public Long getSubmitId() {
        return submitId;
    }

    /**
     * 提交id，记录在voj_submission的id，默认为0，表示没有创建提交
     */
    public void setSubmitId(Long submitId) {
        this.submitId = submitId;
    }

    /**
     * 用户id
     */
    public Long getUserId() {
        return userId;
    }

    /**
     * 用户id
     */
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    /**
     * 作业id
     */
    public Long getHomeworkId() {
        return homeworkId;
    }

    /**
     * 作业id
     */
    public void setHomeworkId(Long homeworkId) {
        this.homeworkId = homeworkId;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 更新时间
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 更新时间
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getEvalStatus() {
        return evalStatus;
    }

    public void setEvalStatus(Integer evalStatus) {
        this.evalStatus = evalStatus;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TrainCommitRecord other = (TrainCommitRecord) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getClassId() == null ? other.getClassId() == null : this.getClassId().equals(other.getClassId()))
            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
            && (this.getProblemId() == null ? other.getProblemId() == null : this.getProblemId().equals(other.getProblemId()))
            && (this.getSubmitTime() == null ? other.getSubmitTime() == null : this.getSubmitTime().equals(other.getSubmitTime()))
            && (this.getLanguage() == null ? other.getLanguage() == null : this.getLanguage().equals(other.getLanguage()))
            && (this.getAnswer() == null ? other.getAnswer() == null : this.getAnswer().equals(other.getAnswer()))
            && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore()))
            && (this.getSubmitId() == null ? other.getSubmitId() == null : this.getSubmitId().equals(other.getSubmitId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getHomeworkId() == null ? other.getHomeworkId() == null : this.getHomeworkId().equals(other.getHomeworkId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getClassId() == null) ? 0 : getClassId().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getProblemId() == null) ? 0 : getProblemId().hashCode());
        result = prime * result + ((getSubmitTime() == null) ? 0 : getSubmitTime().hashCode());
        result = prime * result + ((getLanguage() == null) ? 0 : getLanguage().hashCode());
        result = prime * result + ((getAnswer() == null) ? 0 : getAnswer().hashCode());
        result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode());
        result = prime * result + ((getSubmitId() == null) ? 0 : getSubmitId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getHomeworkId() == null) ? 0 : getHomeworkId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", classId=").append(classId);
        sb.append(", username=").append(username);
        sb.append(", problemId=").append(problemId);
        sb.append(", submitTime=").append(submitTime);
        sb.append(", language=").append(language);
        sb.append(", answer=").append(answer);
        sb.append(", score=").append(score);
        sb.append(", submitId=").append(submitId);
        sb.append(", userId=").append(userId);
        sb.append(", homeworkId=").append(homeworkId);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}